3.12.11 \(\int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^2} \, dx\) [1111]

Optimal. Leaf size=209 \[ -\frac {i (c-i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{4 a^2 f}+\frac {\left (2 c d+i \left (2 c^2+d^2\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{8 a^2 \sqrt {c+i d} f}+\frac {(2 i c+3 d) \sqrt {c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}+\frac {(i c-d) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2} \]

[Out]

-1/4*I*(c-I*d)^(3/2)*arctanh((c+d*tan(f*x+e))^(1/2)/(c-I*d)^(1/2))/a^2/f+1/8*(2*c*d+I*(2*c^2+d^2))*arctanh((c+
d*tan(f*x+e))^(1/2)/(c+I*d)^(1/2))/a^2/f/(c+I*d)^(1/2)+1/8*(2*I*c+3*d)*(c+d*tan(f*x+e))^(1/2)/a^2/f/(1+I*tan(f
*x+e))+1/4*(I*c-d)*(c+d*tan(f*x+e))^(1/2)/f/(a+I*a*tan(f*x+e))^2

________________________________________________________________________________________

Rubi [A]
time = 0.44, antiderivative size = 209, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3639, 3677, 3620, 3618, 65, 214} \begin {gather*} \frac {\left (2 c d+i \left (2 c^2+d^2\right )\right ) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{8 a^2 f \sqrt {c+i d}}+\frac {(3 d+2 i c) \sqrt {c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}-\frac {i (c-i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{4 a^2 f}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*Tan[e + f*x])^(3/2)/(a + I*a*Tan[e + f*x])^2,x]

[Out]

((-1/4*I)*(c - I*d)^(3/2)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c - I*d]])/(a^2*f) + ((2*c*d + I*(2*c^2 + d^2)
)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c + I*d]])/(8*a^2*Sqrt[c + I*d]*f) + (((2*I)*c + 3*d)*Sqrt[c + d*Tan[e
 + f*x]])/(8*a^2*f*(1 + I*Tan[e + f*x])) + ((I*c - d)*Sqrt[c + d*Tan[e + f*x]])/(4*f*(a + I*a*Tan[e + f*x])^2)

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 3618

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c*(
d/f), Subst[Int[(a + (b/d)*x)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] &&
NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]

Rule 3620

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c
 + I*d)/2, Int[(a + b*Tan[e + f*x])^m*(1 - I*Tan[e + f*x]), x], x] + Dist[(c - I*d)/2, Int[(a + b*Tan[e + f*x]
)^m*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0]
&& NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]

Rule 3639

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[(-(b*c - a*d))*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n - 1)/(2*a*f*m)), x] + Dist[1/(2*a^2*m), Int[(
a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^(n - 2)*Simp[c*(a*c*m + b*d*(n - 1)) - d*(b*c*m + a*d*(n - 1)
) - d*(b*d*(m - n + 1) - a*c*(m + n - 1))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c
- a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && LtQ[m, 0] && GtQ[n, 1] && (IntegerQ[m] || IntegersQ[2*m
, 2*n])

Rule 3677

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*A + b*B)*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(2*
f*m*(b*c - a*d))), x] + Dist[1/(2*a*m*(b*c - a*d)), Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Si
mp[A*(b*c*m - a*d*(2*m + n + 1)) + B*(a*c*m - b*d*(n + 1)) + d*(A*b - a*B)*(m + n + 1)*Tan[e + f*x], x], x], x
] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] &&  !GtQ[n,
0]

Rubi steps

\begin {align*} \int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^2} \, dx &=\frac {(i c-d) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}-\frac {\int \frac {-\frac {1}{2} a \left (4 c^2-5 i c d+d^2\right )-\frac {1}{2} a (3 c-5 i d) d \tan (e+f x)}{(a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)}} \, dx}{4 a^2}\\ &=\frac {(2 i c+3 d) \sqrt {c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}+\frac {(i c-d) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}+\frac {\int \frac {\frac {1}{2} a^2 \left (4 i c^3+2 c^2 d+5 i c d^2+d^3\right )+\frac {1}{2} a^2 (i c-d) (2 c-3 i d) d \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{8 a^4 (i c-d)}\\ &=\frac {(2 i c+3 d) \sqrt {c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}+\frac {(i c-d) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}+\frac {(c-i d)^2 \int \frac {1+i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{8 a^2}+\frac {\left (2 c^2-2 i c d+d^2\right ) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{16 a^2}\\ &=\frac {(2 i c+3 d) \sqrt {c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}+\frac {(i c-d) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}+\frac {\left (i (c-i d)^2\right ) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {c-i d x}} \, dx,x,i \tan (e+f x)\right )}{8 a^2 f}-\frac {\left (i \left (2 c^2-2 i c d+d^2\right )\right ) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {c+i d x}} \, dx,x,-i \tan (e+f x)\right )}{16 a^2 f}\\ &=\frac {(2 i c+3 d) \sqrt {c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}+\frac {(i c-d) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}-\frac {(c-i d)^2 \text {Subst}\left (\int \frac {1}{-1-\frac {i c}{d}+\frac {i x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{4 a^2 d f}-\frac {\left (2 c^2-2 i c d+d^2\right ) \text {Subst}\left (\int \frac {1}{-1+\frac {i c}{d}-\frac {i x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{8 a^2 d f}\\ &=-\frac {i (c-i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{4 a^2 f}+\frac {\left (2 i c^2+2 c d+i d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{8 a^2 \sqrt {c+i d} f}+\frac {(2 i c+3 d) \sqrt {c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}+\frac {(i c-d) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.96, size = 272, normalized size = 1.30 \begin {gather*} \frac {\sec ^2(e+f x) (\cos (f x)+i \sin (f x))^2 \left (\frac {2 \left (-i \sqrt {-c+i d} \left (2 c^2-2 i c d+d^2\right ) \text {ArcTan}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {-c-i d}}\right )+2 i \sqrt {-c-i d} (c-i d)^2 \text {ArcTan}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {-c+i d}}\right )\right ) (\cos (2 e)+i \sin (2 e))}{\sqrt {-c-i d} \sqrt {-c+i d}}+2 \cos (e+f x) (\cos (2 f x)-i \sin (2 f x)) ((4 i c+d) \cos (e+f x)+(-2 c+3 i d) \sin (e+f x)) \sqrt {c+d \tan (e+f x)}\right )}{16 f (a+i a \tan (e+f x))^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*Tan[e + f*x])^(3/2)/(a + I*a*Tan[e + f*x])^2,x]

[Out]

(Sec[e + f*x]^2*(Cos[f*x] + I*Sin[f*x])^2*((2*((-I)*Sqrt[-c + I*d]*(2*c^2 - (2*I)*c*d + d^2)*ArcTan[Sqrt[c + d
*Tan[e + f*x]]/Sqrt[-c - I*d]] + (2*I)*Sqrt[-c - I*d]*(c - I*d)^2*ArcTan[Sqrt[c + d*Tan[e + f*x]]/Sqrt[-c + I*
d]])*(Cos[2*e] + I*Sin[2*e]))/(Sqrt[-c - I*d]*Sqrt[-c + I*d]) + 2*Cos[e + f*x]*(Cos[2*f*x] - I*Sin[2*f*x])*(((
4*I)*c + d)*Cos[e + f*x] + (-2*c + (3*I)*d)*Sin[e + f*x])*Sqrt[c + d*Tan[e + f*x]]))/(16*f*(a + I*a*Tan[e + f*
x])^2)

________________________________________________________________________________________

Maple [A]
time = 0.42, size = 284, normalized size = 1.36

method result size
derivativedivides \(\frac {2 d^{3} \left (\frac {i \left (\frac {-\frac {d \left (2 i c^{3}+4 i c \,d^{2}-c^{2} d -3 d^{3}\right ) \left (c +d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{2 \left (2 i c d +c^{2}-d^{2}\right )}+\frac {d \left (2 i c^{4}-3 i c^{2} d^{2}-i d^{4}-5 c^{3} d -c \,d^{3}\right ) \sqrt {c +d \tan \left (f x +e \right )}}{4 i c d +2 c^{2}-2 d^{2}}}{\left (-d \tan \left (f x +e \right )+i d \right )^{2}}-\frac {\left (2 i c^{3} d +4 i c \,d^{3}+2 c^{4}+3 c^{2} d^{2}-d^{4}\right ) \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {-i d -c}}\right )}{2 \left (2 i c d +c^{2}-d^{2}\right ) \sqrt {-i d -c}}\right )}{8 d^{3}}+\frac {i \left (i d -c \right )^{\frac {3}{2}} \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {i d -c}}\right )}{8 d^{3}}\right )}{f \,a^{2}}\) \(284\)
default \(\frac {2 d^{3} \left (\frac {i \left (\frac {-\frac {d \left (2 i c^{3}+4 i c \,d^{2}-c^{2} d -3 d^{3}\right ) \left (c +d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{2 \left (2 i c d +c^{2}-d^{2}\right )}+\frac {d \left (2 i c^{4}-3 i c^{2} d^{2}-i d^{4}-5 c^{3} d -c \,d^{3}\right ) \sqrt {c +d \tan \left (f x +e \right )}}{4 i c d +2 c^{2}-2 d^{2}}}{\left (-d \tan \left (f x +e \right )+i d \right )^{2}}-\frac {\left (2 i c^{3} d +4 i c \,d^{3}+2 c^{4}+3 c^{2} d^{2}-d^{4}\right ) \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {-i d -c}}\right )}{2 \left (2 i c d +c^{2}-d^{2}\right ) \sqrt {-i d -c}}\right )}{8 d^{3}}+\frac {i \left (i d -c \right )^{\frac {3}{2}} \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {i d -c}}\right )}{8 d^{3}}\right )}{f \,a^{2}}\) \(284\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c+d*tan(f*x+e))^(3/2)/(a+I*a*tan(f*x+e))^2,x,method=_RETURNVERBOSE)

[Out]

2/f/a^2*d^3*(1/8*I/d^3*((-1/2*d*(2*I*c^3+4*I*c*d^2-c^2*d-3*d^3)/(2*I*c*d+c^2-d^2)*(c+d*tan(f*x+e))^(3/2)+1/2*d
*(2*I*c^4-3*I*c^2*d^2-I*d^4-5*c^3*d-c*d^3)/(2*I*c*d+c^2-d^2)*(c+d*tan(f*x+e))^(1/2))/(-d*tan(f*x+e)+I*d)^2-1/2
*(2*I*c^3*d+4*I*c*d^3+2*c^4+3*c^2*d^2-d^4)/(2*I*c*d+c^2-d^2)/(-I*d-c)^(1/2)*arctan((c+d*tan(f*x+e))^(1/2)/(-I*
d-c)^(1/2)))+1/8*I*(I*d-c)^(3/2)/d^3*arctan((c+d*tan(f*x+e))^(1/2)/(I*d-c)^(1/2)))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^(3/2)/(a+I*a*tan(f*x+e))^2,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1012 vs. \(2 (168) = 336\).
time = 1.26, size = 1012, normalized size = 4.84 \begin {gather*} \frac {{\left (2 \, a^{2} f \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 3 \, c d^{2} + i \, d^{3}}{a^{4} f^{2}}} e^{\left (4 i \, f x + 4 i \, e\right )} \log \left (-\frac {2 \, {\left (-i \, c^{2} - c d + {\left (a^{2} f e^{\left (2 i \, f x + 2 i \, e\right )} + a^{2} f\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 3 \, c d^{2} + i \, d^{3}}{a^{4} f^{2}}} + {\left (-i \, c^{2} - 2 \, c d + i \, d^{2}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{i \, c + d}\right ) - 2 \, a^{2} f \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 3 \, c d^{2} + i \, d^{3}}{a^{4} f^{2}}} e^{\left (4 i \, f x + 4 i \, e\right )} \log \left (-\frac {2 \, {\left (-i \, c^{2} - c d - {\left (a^{2} f e^{\left (2 i \, f x + 2 i \, e\right )} + a^{2} f\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {c^{3} - 3 i \, c^{2} d - 3 \, c d^{2} + i \, d^{3}}{a^{4} f^{2}}} + {\left (-i \, c^{2} - 2 \, c d + i \, d^{2}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{i \, c + d}\right ) + a^{2} f \sqrt {-\frac {4 i \, c^{4} + 8 \, c^{3} d + 4 \, c d^{3} + i \, d^{4}}{{\left (i \, a^{4} c - a^{4} d\right )} f^{2}}} e^{\left (4 i \, f x + 4 i \, e\right )} \log \left (-\frac {{\left (2 \, c^{3} + 3 \, c d^{2} + i \, d^{3} - {\left ({\left (i \, a^{2} c - a^{2} d\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (i \, a^{2} c - a^{2} d\right )} f\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {4 i \, c^{4} + 8 \, c^{3} d + 4 \, c d^{3} + i \, d^{4}}{{\left (i \, a^{4} c - a^{4} d\right )} f^{2}}} + {\left (2 \, c^{3} - 2 i \, c^{2} d + c d^{2}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{8 \, {\left (i \, a^{2} c - a^{2} d\right )} f}\right ) - a^{2} f \sqrt {-\frac {4 i \, c^{4} + 8 \, c^{3} d + 4 \, c d^{3} + i \, d^{4}}{{\left (i \, a^{4} c - a^{4} d\right )} f^{2}}} e^{\left (4 i \, f x + 4 i \, e\right )} \log \left (-\frac {{\left (2 \, c^{3} + 3 \, c d^{2} + i \, d^{3} - {\left ({\left (-i \, a^{2} c + a^{2} d\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-i \, a^{2} c + a^{2} d\right )} f\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {4 i \, c^{4} + 8 \, c^{3} d + 4 \, c d^{3} + i \, d^{4}}{{\left (i \, a^{4} c - a^{4} d\right )} f^{2}}} + {\left (2 \, c^{3} - 2 i \, c^{2} d + c d^{2}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{8 \, {\left (i \, a^{2} c - a^{2} d\right )} f}\right ) + 2 \, {\left ({\left (3 i \, c + 2 \, d\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (4 i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{32 \, a^{2} f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^(3/2)/(a+I*a*tan(f*x+e))^2,x, algorithm="fricas")

[Out]

1/32*(2*a^2*f*sqrt(-(c^3 - 3*I*c^2*d - 3*c*d^2 + I*d^3)/(a^4*f^2))*e^(4*I*f*x + 4*I*e)*log(-2*(-I*c^2 - c*d +
(a^2*f*e^(2*I*f*x + 2*I*e) + a^2*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*
sqrt(-(c^3 - 3*I*c^2*d - 3*c*d^2 + I*d^3)/(a^4*f^2)) + (-I*c^2 - 2*c*d + I*d^2)*e^(2*I*f*x + 2*I*e))*e^(-2*I*f
*x - 2*I*e)/(I*c + d)) - 2*a^2*f*sqrt(-(c^3 - 3*I*c^2*d - 3*c*d^2 + I*d^3)/(a^4*f^2))*e^(4*I*f*x + 4*I*e)*log(
-2*(-I*c^2 - c*d - (a^2*f*e^(2*I*f*x + 2*I*e) + a^2*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*
f*x + 2*I*e) + 1))*sqrt(-(c^3 - 3*I*c^2*d - 3*c*d^2 + I*d^3)/(a^4*f^2)) + (-I*c^2 - 2*c*d + I*d^2)*e^(2*I*f*x
+ 2*I*e))*e^(-2*I*f*x - 2*I*e)/(I*c + d)) + a^2*f*sqrt(-(4*I*c^4 + 8*c^3*d + 4*c*d^3 + I*d^4)/((I*a^4*c - a^4*
d)*f^2))*e^(4*I*f*x + 4*I*e)*log(-1/8*(2*c^3 + 3*c*d^2 + I*d^3 - ((I*a^2*c - a^2*d)*f*e^(2*I*f*x + 2*I*e) + (I
*a^2*c - a^2*d)*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(-(4*I*c^4 +
8*c^3*d + 4*c*d^3 + I*d^4)/((I*a^4*c - a^4*d)*f^2)) + (2*c^3 - 2*I*c^2*d + c*d^2)*e^(2*I*f*x + 2*I*e))*e^(-2*I
*f*x - 2*I*e)/((I*a^2*c - a^2*d)*f)) - a^2*f*sqrt(-(4*I*c^4 + 8*c^3*d + 4*c*d^3 + I*d^4)/((I*a^4*c - a^4*d)*f^
2))*e^(4*I*f*x + 4*I*e)*log(-1/8*(2*c^3 + 3*c*d^2 + I*d^3 - ((-I*a^2*c + a^2*d)*f*e^(2*I*f*x + 2*I*e) + (-I*a^
2*c + a^2*d)*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(-(4*I*c^4 + 8*c
^3*d + 4*c*d^3 + I*d^4)/((I*a^4*c - a^4*d)*f^2)) + (2*c^3 - 2*I*c^2*d + c*d^2)*e^(2*I*f*x + 2*I*e))*e^(-2*I*f*
x - 2*I*e)/((I*a^2*c - a^2*d)*f)) + 2*((3*I*c + 2*d)*e^(4*I*f*x + 4*I*e) + (4*I*c + d)*e^(2*I*f*x + 2*I*e) + I
*c - d)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))*e^(-4*I*f*x - 4*I*e)/(a^2*f
)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {c \sqrt {c + d \tan {\left (e + f x \right )}}}{\tan ^{2}{\left (e + f x \right )} - 2 i \tan {\left (e + f x \right )} - 1}\, dx + \int \frac {d \sqrt {c + d \tan {\left (e + f x \right )}} \tan {\left (e + f x \right )}}{\tan ^{2}{\left (e + f x \right )} - 2 i \tan {\left (e + f x \right )} - 1}\, dx}{a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))**(3/2)/(a+I*a*tan(f*x+e))**2,x)

[Out]

-(Integral(c*sqrt(c + d*tan(e + f*x))/(tan(e + f*x)**2 - 2*I*tan(e + f*x) - 1), x) + Integral(d*sqrt(c + d*tan
(e + f*x))*tan(e + f*x)/(tan(e + f*x)**2 - 2*I*tan(e + f*x) - 1), x))/a**2

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 462 vs. \(2 (168) = 336\).
time = 0.66, size = 462, normalized size = 2.21 \begin {gather*} -\frac {{\left (c^{2} - 2 i \, c d - d^{2}\right )} \arctan \left (-\frac {2 \, {\left (-i \, \sqrt {d \tan \left (f x + e\right ) + c} c - i \, \sqrt {c^{2} + d^{2}} \sqrt {d \tan \left (f x + e\right ) + c}\right )}}{\sqrt {2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} c - i \, \sqrt {2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} d + \sqrt {c^{2} + d^{2}} \sqrt {2 \, c + 2 \, \sqrt {c^{2} + d^{2}}}}\right )}{2 \, a^{2} \sqrt {2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} f {\left (-\frac {i \, d}{c + \sqrt {c^{2} + d^{2}}} + 1\right )}} - \frac {{\left (2 i \, c^{2} + 2 \, c d + i \, d^{2}\right )} \arctan \left (\frac {2 \, {\left (\sqrt {d \tan \left (f x + e\right ) + c} c - \sqrt {c^{2} + d^{2}} \sqrt {d \tan \left (f x + e\right ) + c}\right )}}{c \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} + i \, \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} d - \sqrt {c^{2} + d^{2}} \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}}}\right )}{4 \, a^{2} \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} f {\left (\frac {i \, d}{c - \sqrt {c^{2} + d^{2}}} + 1\right )}} + \frac {2 \, {\left (d \tan \left (f x + e\right ) + c\right )}^{\frac {3}{2}} c d - 2 \, \sqrt {d \tan \left (f x + e\right ) + c} c^{2} d - 3 i \, {\left (d \tan \left (f x + e\right ) + c\right )}^{\frac {3}{2}} d^{2} - i \, \sqrt {d \tan \left (f x + e\right ) + c} c d^{2} - \sqrt {d \tan \left (f x + e\right ) + c} d^{3}}{8 \, {\left (d \tan \left (f x + e\right ) - i \, d\right )}^{2} a^{2} f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^(3/2)/(a+I*a*tan(f*x+e))^2,x, algorithm="giac")

[Out]

-1/2*(c^2 - 2*I*c*d - d^2)*arctan(-2*(-I*sqrt(d*tan(f*x + e) + c)*c - I*sqrt(c^2 + d^2)*sqrt(d*tan(f*x + e) +
c))/(sqrt(2*c + 2*sqrt(c^2 + d^2))*c - I*sqrt(2*c + 2*sqrt(c^2 + d^2))*d + sqrt(c^2 + d^2)*sqrt(2*c + 2*sqrt(c
^2 + d^2))))/(a^2*sqrt(2*c + 2*sqrt(c^2 + d^2))*f*(-I*d/(c + sqrt(c^2 + d^2)) + 1)) - 1/4*(2*I*c^2 + 2*c*d + I
*d^2)*arctan(2*(sqrt(d*tan(f*x + e) + c)*c - sqrt(c^2 + d^2)*sqrt(d*tan(f*x + e) + c))/(c*sqrt(-2*c + 2*sqrt(c
^2 + d^2)) + I*sqrt(-2*c + 2*sqrt(c^2 + d^2))*d - sqrt(c^2 + d^2)*sqrt(-2*c + 2*sqrt(c^2 + d^2))))/(a^2*sqrt(-
2*c + 2*sqrt(c^2 + d^2))*f*(I*d/(c - sqrt(c^2 + d^2)) + 1)) + 1/8*(2*(d*tan(f*x + e) + c)^(3/2)*c*d - 2*sqrt(d
*tan(f*x + e) + c)*c^2*d - 3*I*(d*tan(f*x + e) + c)^(3/2)*d^2 - I*sqrt(d*tan(f*x + e) + c)*c*d^2 - sqrt(d*tan(
f*x + e) + c)*d^3)/((d*tan(f*x + e) - I*d)^2*a^2*f)

________________________________________________________________________________________

Mupad [B]
time = 7.76, size = 1580, normalized size = 7.56 \begin {gather*} -\mathrm {atan}\left (\frac {a^4\,d^6\,f^2\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {\frac {3\,c\,d^2}{64\,a^4\,f^2}-\frac {d^3\,1{}\mathrm {i}}{64\,a^4\,f^2}-\frac {c^3}{64\,a^4\,f^2}+\frac {c^2\,d\,3{}\mathrm {i}}{64\,a^4\,f^2}}\,80{}\mathrm {i}}{8\,f\,a^2\,c^3\,d^5-26{}\mathrm {i}\,f\,a^2\,c^2\,d^6-28\,f\,a^2\,c\,d^7+10{}\mathrm {i}\,f\,a^2\,d^8}-\frac {64\,a^4\,c\,d^5\,f^2\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {\frac {3\,c\,d^2}{64\,a^4\,f^2}-\frac {d^3\,1{}\mathrm {i}}{64\,a^4\,f^2}-\frac {c^3}{64\,a^4\,f^2}+\frac {c^2\,d\,3{}\mathrm {i}}{64\,a^4\,f^2}}}{8\,f\,a^2\,c^3\,d^5-26{}\mathrm {i}\,f\,a^2\,c^2\,d^6-28\,f\,a^2\,c\,d^7+10{}\mathrm {i}\,f\,a^2\,d^8}\right )\,\sqrt {\frac {-2\,c^3+c^2\,d\,6{}\mathrm {i}+6\,c\,d^2-d^3\,2{}\mathrm {i}}{128\,a^4\,f^2}}\,2{}\mathrm {i}-\frac {\frac {\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\left (6\,c^2\,d+c\,d^2\,3{}\mathrm {i}+3\,d^3\right )}{24\,a^2\,f}+\frac {d\,\left (3\,d+c\,2{}\mathrm {i}\right )\,{\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}\,1{}\mathrm {i}}{8\,a^2\,f}}{{\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )}^2-\left (2\,c+d\,2{}\mathrm {i}\right )\,\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )+c^2-d^2+c\,d\,2{}\mathrm {i}}-\mathrm {atan}\left (\frac {\left (\left (a^2\,f\,\left (-256\,a^4\,c^2\,d^3\,f^2+a^4\,c\,d^4\,f^2\,384{}\mathrm {i}+128\,a^4\,d^5\,f^2\right )-4096\,a^8\,c\,d^2\,f^4\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {-\frac {c^4\,4{}\mathrm {i}+8\,c^3\,d+4\,c\,d^3+d^4\,1{}\mathrm {i}}{256\,a^4\,f^2\,\left (-d+c\,1{}\mathrm {i}\right )}}\right )\,\sqrt {-\frac {c^4\,4{}\mathrm {i}+8\,c^3\,d+4\,c\,d^3+d^4\,1{}\mathrm {i}}{256\,a^4\,f^2\,\left (-d+c\,1{}\mathrm {i}\right )}}-8\,a^4\,f^2\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\left (8\,c^4\,d^2-c^3\,d^3\,24{}\mathrm {i}-24\,c^2\,d^4+c\,d^5\,12{}\mathrm {i}+5\,d^6\right )\right )\,\sqrt {-\frac {c^4\,4{}\mathrm {i}+8\,c^3\,d+4\,c\,d^3+d^4\,1{}\mathrm {i}}{256\,a^4\,f^2\,\left (-d+c\,1{}\mathrm {i}\right )}}\,1{}\mathrm {i}-\left (\left (a^2\,f\,\left (-256\,a^4\,c^2\,d^3\,f^2+a^4\,c\,d^4\,f^2\,384{}\mathrm {i}+128\,a^4\,d^5\,f^2\right )+4096\,a^8\,c\,d^2\,f^4\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {-\frac {c^4\,4{}\mathrm {i}+8\,c^3\,d+4\,c\,d^3+d^4\,1{}\mathrm {i}}{256\,a^4\,f^2\,\left (-d+c\,1{}\mathrm {i}\right )}}\right )\,\sqrt {-\frac {c^4\,4{}\mathrm {i}+8\,c^3\,d+4\,c\,d^3+d^4\,1{}\mathrm {i}}{256\,a^4\,f^2\,\left (-d+c\,1{}\mathrm {i}\right )}}+8\,a^4\,f^2\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\left (8\,c^4\,d^2-c^3\,d^3\,24{}\mathrm {i}-24\,c^2\,d^4+c\,d^5\,12{}\mathrm {i}+5\,d^6\right )\right )\,\sqrt {-\frac {c^4\,4{}\mathrm {i}+8\,c^3\,d+4\,c\,d^3+d^4\,1{}\mathrm {i}}{256\,a^4\,f^2\,\left (-d+c\,1{}\mathrm {i}\right )}}\,1{}\mathrm {i}}{\left (\left (a^2\,f\,\left (-256\,a^4\,c^2\,d^3\,f^2+a^4\,c\,d^4\,f^2\,384{}\mathrm {i}+128\,a^4\,d^5\,f^2\right )-4096\,a^8\,c\,d^2\,f^4\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {-\frac {c^4\,4{}\mathrm {i}+8\,c^3\,d+4\,c\,d^3+d^4\,1{}\mathrm {i}}{256\,a^4\,f^2\,\left (-d+c\,1{}\mathrm {i}\right )}}\right )\,\sqrt {-\frac {c^4\,4{}\mathrm {i}+8\,c^3\,d+4\,c\,d^3+d^4\,1{}\mathrm {i}}{256\,a^4\,f^2\,\left (-d+c\,1{}\mathrm {i}\right )}}-8\,a^4\,f^2\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\left (8\,c^4\,d^2-c^3\,d^3\,24{}\mathrm {i}-24\,c^2\,d^4+c\,d^5\,12{}\mathrm {i}+5\,d^6\right )\right )\,\sqrt {-\frac {c^4\,4{}\mathrm {i}+8\,c^3\,d+4\,c\,d^3+d^4\,1{}\mathrm {i}}{256\,a^4\,f^2\,\left (-d+c\,1{}\mathrm {i}\right )}}+\left (\left (a^2\,f\,\left (-256\,a^4\,c^2\,d^3\,f^2+a^4\,c\,d^4\,f^2\,384{}\mathrm {i}+128\,a^4\,d^5\,f^2\right )+4096\,a^8\,c\,d^2\,f^4\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {-\frac {c^4\,4{}\mathrm {i}+8\,c^3\,d+4\,c\,d^3+d^4\,1{}\mathrm {i}}{256\,a^4\,f^2\,\left (-d+c\,1{}\mathrm {i}\right )}}\right )\,\sqrt {-\frac {c^4\,4{}\mathrm {i}+8\,c^3\,d+4\,c\,d^3+d^4\,1{}\mathrm {i}}{256\,a^4\,f^2\,\left (-d+c\,1{}\mathrm {i}\right )}}+8\,a^4\,f^2\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\left (8\,c^4\,d^2-c^3\,d^3\,24{}\mathrm {i}-24\,c^2\,d^4+c\,d^5\,12{}\mathrm {i}+5\,d^6\right )\right )\,\sqrt {-\frac {c^4\,4{}\mathrm {i}+8\,c^3\,d+4\,c\,d^3+d^4\,1{}\mathrm {i}}{256\,a^4\,f^2\,\left (-d+c\,1{}\mathrm {i}\right )}}+2\,a^2\,f\,\left (-4\,c^5\,d^3+c^4\,d^4\,18{}\mathrm {i}+28\,c^3\,d^5-c^2\,d^6\,15{}\mathrm {i}+2\,c\,d^7-d^8\,3{}\mathrm {i}\right )}\right )\,\sqrt {-\frac {c^4\,4{}\mathrm {i}+8\,c^3\,d+4\,c\,d^3+d^4\,1{}\mathrm {i}}{256\,a^4\,f^2\,\left (-d+c\,1{}\mathrm {i}\right )}}\,2{}\mathrm {i} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*tan(e + f*x))^(3/2)/(a + a*tan(e + f*x)*1i)^2,x)

[Out]

- atan((a^4*d^6*f^2*(c + d*tan(e + f*x))^(1/2)*((3*c*d^2)/(64*a^4*f^2) - (d^3*1i)/(64*a^4*f^2) - c^3/(64*a^4*f
^2) + (c^2*d*3i)/(64*a^4*f^2))^(1/2)*80i)/(a^2*d^8*f*10i - a^2*c^2*d^6*f*26i + 8*a^2*c^3*d^5*f - 28*a^2*c*d^7*
f) - (64*a^4*c*d^5*f^2*(c + d*tan(e + f*x))^(1/2)*((3*c*d^2)/(64*a^4*f^2) - (d^3*1i)/(64*a^4*f^2) - c^3/(64*a^
4*f^2) + (c^2*d*3i)/(64*a^4*f^2))^(1/2))/(a^2*d^8*f*10i - a^2*c^2*d^6*f*26i + 8*a^2*c^3*d^5*f - 28*a^2*c*d^7*f
))*((6*c*d^2 + c^2*d*6i - 2*c^3 - d^3*2i)/(128*a^4*f^2))^(1/2)*2i - (((c + d*tan(e + f*x))^(1/2)*(c*d^2*3i + 6
*c^2*d + 3*d^3))/(24*a^2*f) + (d*(c*2i + 3*d)*(c + d*tan(e + f*x))^(3/2)*1i)/(8*a^2*f))/(c*d*2i - (2*c + d*2i)
*(c + d*tan(e + f*x)) + (c + d*tan(e + f*x))^2 + c^2 - d^2) - atan((((a^2*f*(128*a^4*d^5*f^2 + a^4*c*d^4*f^2*3
84i - 256*a^4*c^2*d^3*f^2) - 4096*a^8*c*d^2*f^4*(c + d*tan(e + f*x))^(1/2)*(-(4*c*d^3 + 8*c^3*d + c^4*4i + d^4
*1i)/(256*a^4*f^2*(c*1i - d)))^(1/2))*(-(4*c*d^3 + 8*c^3*d + c^4*4i + d^4*1i)/(256*a^4*f^2*(c*1i - d)))^(1/2)
- 8*a^4*f^2*(c + d*tan(e + f*x))^(1/2)*(c*d^5*12i + 5*d^6 - 24*c^2*d^4 - c^3*d^3*24i + 8*c^4*d^2))*(-(4*c*d^3
+ 8*c^3*d + c^4*4i + d^4*1i)/(256*a^4*f^2*(c*1i - d)))^(1/2)*1i - ((a^2*f*(128*a^4*d^5*f^2 + a^4*c*d^4*f^2*384
i - 256*a^4*c^2*d^3*f^2) + 4096*a^8*c*d^2*f^4*(c + d*tan(e + f*x))^(1/2)*(-(4*c*d^3 + 8*c^3*d + c^4*4i + d^4*1
i)/(256*a^4*f^2*(c*1i - d)))^(1/2))*(-(4*c*d^3 + 8*c^3*d + c^4*4i + d^4*1i)/(256*a^4*f^2*(c*1i - d)))^(1/2) +
8*a^4*f^2*(c + d*tan(e + f*x))^(1/2)*(c*d^5*12i + 5*d^6 - 24*c^2*d^4 - c^3*d^3*24i + 8*c^4*d^2))*(-(4*c*d^3 +
8*c^3*d + c^4*4i + d^4*1i)/(256*a^4*f^2*(c*1i - d)))^(1/2)*1i)/(((a^2*f*(128*a^4*d^5*f^2 + a^4*c*d^4*f^2*384i
- 256*a^4*c^2*d^3*f^2) - 4096*a^8*c*d^2*f^4*(c + d*tan(e + f*x))^(1/2)*(-(4*c*d^3 + 8*c^3*d + c^4*4i + d^4*1i)
/(256*a^4*f^2*(c*1i - d)))^(1/2))*(-(4*c*d^3 + 8*c^3*d + c^4*4i + d^4*1i)/(256*a^4*f^2*(c*1i - d)))^(1/2) - 8*
a^4*f^2*(c + d*tan(e + f*x))^(1/2)*(c*d^5*12i + 5*d^6 - 24*c^2*d^4 - c^3*d^3*24i + 8*c^4*d^2))*(-(4*c*d^3 + 8*
c^3*d + c^4*4i + d^4*1i)/(256*a^4*f^2*(c*1i - d)))^(1/2) + ((a^2*f*(128*a^4*d^5*f^2 + a^4*c*d^4*f^2*384i - 256
*a^4*c^2*d^3*f^2) + 4096*a^8*c*d^2*f^4*(c + d*tan(e + f*x))^(1/2)*(-(4*c*d^3 + 8*c^3*d + c^4*4i + d^4*1i)/(256
*a^4*f^2*(c*1i - d)))^(1/2))*(-(4*c*d^3 + 8*c^3*d + c^4*4i + d^4*1i)/(256*a^4*f^2*(c*1i - d)))^(1/2) + 8*a^4*f
^2*(c + d*tan(e + f*x))^(1/2)*(c*d^5*12i + 5*d^6 - 24*c^2*d^4 - c^3*d^3*24i + 8*c^4*d^2))*(-(4*c*d^3 + 8*c^3*d
 + c^4*4i + d^4*1i)/(256*a^4*f^2*(c*1i - d)))^(1/2) + 2*a^2*f*(2*c*d^7 - d^8*3i - c^2*d^6*15i + 28*c^3*d^5 + c
^4*d^4*18i - 4*c^5*d^3)))*(-(4*c*d^3 + 8*c^3*d + c^4*4i + d^4*1i)/(256*a^4*f^2*(c*1i - d)))^(1/2)*2i

________________________________________________________________________________________